package com.example.mybatisdemo;

import com.example.mybatisdemo.entity.User;
import com.example.mybatisdemo.service.UserService;
import com.example.mybatisdemo.service.impl.UserServiceImpl;

public class App {
    public static void main(String[] args) {
        // 创建用户服务实例
        UserService userService = new UserServiceImpl();
        // 创建用户对象
        User user = new User("testuser", "123456");
        // 调用添加用户方法
        int result = userService.addUser(user);
        if (result > 0) {
            System.out.println("用户添加成功！");
        } else {
            System.out.println("用户添加失败！");
        }
    }
}
